﻿Imports System.Collections.Generic
Imports Pop.Api.Response
Imports Pop.Api.Util

Namespace Pop.Api.Request
    ''' <summary>
    ''' 19.1 查询物流的基本信息
    ''' </summary>
    Public Class GetTrackInfoRequest
        Inherits PopRequest(Of GetTrackInfoResponse)
        ''' <summary>
        ''' 物流公司名称
        ''' </summary>
        Property Company As String

        ''' <summary>
        ''' 物流公司编码，最大长度31个字节，选填，和物流公司一一对应
        ''' </summary>
        Property CompanyCode As String

        ''' <summary>
        ''' 运单号，最大长度63个字节，必填
        ''' </summary>
        Property WuliuCarryId As String

#Region "Overrides"
        Protected Overrides Function GetApiName() As String
            Return "wuliu.getTrackInfo"
        End Function

        Protected Overrides Function GetParameters() As IEnumerable(Of KeyValuePair(Of String, String))
            Dim parameters As New PopDictionary
            parameters.Add("company", Me.Company)
            parameters.Add("companyCode", Me.CompanyCode)
            parameters.Add("wuliuCarryId", Me.WuliuCarryId)
            Return parameters
        End Function

        Protected Overrides Sub Validate()
            Me.Company.ValidateRequired("company")
            Me.WuliuCarryId.ValidateRequired("wuliuCarryId")
        End Sub
#End Region

    End Class
End Namespace